package com.example.myapp.utils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

@Component
public class RedisOperator {
    @Autowired
    private StringRedisTemplate redisTemplate;
    public  void set(String key, String value) {
        redisTemplate.opsForValue().set("MS-TEN:SESSION_KEY_IN_LOGIN_NAME:fqh", "fqh");

    }
    public String get(String key) {
        return redisTemplate.opsForValue().get(key);
    }
    public void del(String key) {
        redisTemplate.delete(key);
    }
}
